package com.assets.room.entity;

import androidx.room.ColumnInfo;
import androidx.room.Entity;
import androidx.room.Ignore;
import androidx.room.PrimaryKey;

import java.io.Serializable;

@Entity(tableName = "t_info_place")
public class Place implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 存放位置id
     */
    @ColumnInfo(name = "id")
    @PrimaryKey(autoGenerate = true)
    private Integer id;

    /**
     * 位置名称
     */
    @ColumnInfo(name = "name")
    private String name;

    /**
     * 位置空间
     */
    @ColumnInfo(name = "big")
    private String big;

    /**
     * 备注
     */
    @ColumnInfo(name = "remark")
    private String remark;

    /**
     * 父级id
     */
    @ColumnInfo(name = "pid")
    private String pid;

    @ColumnInfo(name = "is_flag")
    private String isFlag;

    @Ignore
    public Place() {
    }

    public Place(Integer id, String name, String big, String remark, String pid, String isFlag) {
        this.id = id;
        this.name = name;
        this.big = big;
        this.remark = remark;
        this.pid = pid;
        this.isFlag = isFlag;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getBig() {
        return big;
    }

    public void setBig(String big) {
        this.big = big;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public String getPid() {
        return pid;
    }

    public void setPid(String pid) {
        this.pid = pid;
    }

    public String isFlag() {
        return isFlag;
    }

    public void setFlag(String flag) {
        isFlag = flag;
    }

    @Override
    public String toString() {
        return "Place{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", big='" + big + '\'' +
                ", remark='" + remark + '\'' +
                ", pid='" + pid + '\'' +
                ", isFlag=" + isFlag +
                '}';
    }
}
